/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package MsgViewer;

import javax.swing.JOptionPane;

/**
 *
 * @author lanchana
 * @DataLoader to the spreadsheet
 * @email:lanch.gunawardhana@gmail.com
 */
public class MessageBox {//default jst dsplay
//infr-can input data
 
 public void displayMsg(String type,String message){
     if(type.equals("plain")){
      JOptionPane.showMessageDialog(null,message, "plain",JOptionPane.PLAIN_MESSAGE);
     }
     if(type.equals("information")){
      JOptionPane.showMessageDialog(null,message, "information that has been changed currently within the training period",JOptionPane.INFORMATION_MESSAGE);
     }
     if(type.equals("question")){
      JOptionPane.showMessageDialog(null,message, "question",JOptionPane.QUESTION_MESSAGE);
     }
     if(type.equals("warning")){
         JOptionPane.showMessageDialog(null,message,"warning", JOptionPane.WARNING_MESSAGE);
     }
     if(type.equals("error")){
       JOptionPane.showMessageDialog(null,message, "error", JOptionPane.ERROR_MESSAGE);


     }
 }



 }

